<template>
    <div id="app">
        <router-view />
    </div>
</template>

<script>
import connect from '@/mixins/socket'
import { mapGetters } from 'vuex'
import  store from '@/store'
console.log('store.state.user.info9999999999999',store.state.user.info)
export default {
    name: 'App',
    mixins: [connect],
    data(){
        return {
            socket:"",
            logined:false,
            websocket:"ws://118.24.11.96:9502",
        }
    },
    computed:{
        ...mapGetters(['userinfo']),
    },
    watch:{
        "userinfo.id"(value){
            if(value){
                this.logined=true;
              //  this.connect();
            }
        }
    },
    mounted() {
        // if(this.userinfo.id){
        //     this.connect();
        // }
        // console.log(this.userinfo,111)
        // // this.open1()
      
        
        // setTimeout(()=>{this.aaa()},1000)
        //console.log = function() {}

        //this.getCoinName()
    },
    methods: {
        // getCoinName(){
        //     this.$request
        //         .get('/config/config/coin_name')
        //         .then((res) => {
        //             console.log('coinName',res.result)
        //             this.$store.dispatch('system/coinName',res.result)
        //             console.log('coinName',this.$store.state.user.coin_name)
        //         })
        //         .catch(() => { })
        // },
        
    },
}
</script>
<style lang="scss">
.root {
    margin: 50px 25px 0px 25px;
}
.my-flex {
    display: flex;
}
</style>
